package day8;

/**
 * @author oldliu
 * @since 1.0
 */
public class DownTest {
    public static void main(String[] args) {
        Thread th[] = new Thread[6];
        for (int i = 1; i <= 6; i++) {
            th[i - 1] = new DownloadThread("线程" + i, "片段" + i);
            th[i - 1].start();
        }
        for(Thread t:th){
            try {
                t.join();//主线程等其他的执行完成

            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
        System.out.println("主线程发现都下载完了，合并这个电影。。。");
    }
}
